import request from "@/utils/request";

// 访问码列表
export function getList(query) {
  return request({
    url: "/accessCode/page",
    method: "get",
    params: query,
  });
}

// 访问码详细
export function getAccessCodeDetail(query) {
  return request({
    url: "/accessCode/detail",
    method: "get",
    params: query,
  });
}

// 新增访问码
export function postAccessCode(data) {
  return request({
    url: "/accessCode",
    method: "post",
    data: data,
  });
}

// 修改访问码
export function putAccessCode(data) {
  return request({
    url: "/accessCode",
    method: "put",
    data: data,
  });
}

// 删除访问码
export function delAccessCode(baseId) {
  return request({
    url: "/accessCode?baseId=" + baseId,
    method: "delete",
  });
}
// 查询监控区域树形列表（带摄像头）
export function getCameraTree(query) {
  return request({
    url: "/monitorArea/tree",
    method: "get",
    params: query,
  });
}
// 查询监控区域树形列表
export function getUserAccessAreaCamera(query) {
  return request({
    url: "/system/role/userAccessAreaCamera",
    method: "get",
    params: query,
  });
}
